#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include "dominion.h"

void testing(struct gameState* game);
void init(struct gameState *game);
void check(char *foo, int bar, int ans);

int main(int argc, char *argv[])
{
	struct gameState *game = malloc(sizeof(struct gameState));

	init(game);

	testing(game);

	free(game);

	return 0;
}

void testing(struct gameState* game)
{
	int player = 0;
	int position = 3;
	int before = 0;
	int after = 0;

	before = game->handCount[player];
	// for(int i = 5; i <= 10; i++)
	// {
	// 	check("Before Hand", i, before);

	// 	smith_e(game, position);

	// 	check("After Hand", (i + 2), after);
	// }
	check("Before Hand", 5, before);

	smith_e(game, position);

	check("After Hand", 7, after);

	printf("TESTS COMPLETE....................\n");

	return;
}

void init(struct gameState *game)
{
	int random = rand() % (INT_MAX -1) +1;
	int *l = malloc(sizeof(int) * 10);
	l = kingdomCards(0,1, 2, 3, 4, 5, 6, 7, 8, 9);
	initializeGame(3, l, random, game);

	return; 
}

void check(char *foo, int bar, int ans)
{
	if(bar == ans)
	{
		printf("%s PASSED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}
	else
	{
		printf("%s FAILED, VALUE: %d, EXPECTED: %d\n", foo, ans, bar);
	}
}










